const TokenKey = 'Mytoken'

// 是否登录
const isLogin = () => !!localStorage.getItem(TokenKey)

// 获取token
const getToken = () => localStorage.getItem(TokenKey)

// 设置token
const setToken = (token: string) => localStorage.setItem(TokenKey, token)

// 清楚token
const clearToken = () => localStorage.removeItem(TokenKey)

export { isLogin, getToken, setToken, clearToken }
